<html> 
<style type="text/css"> 
span.membersInGame { 
    font-size: 11px; 
    color: #8bc53f; 
    font-family:arial, Helvetica, tahoma, sans-serif; 
    text-decoration:none; 
} 
span.membersOnline { 
    font-size: 11px; 
    color: #62a7e3; 
    font-family:arial, Helvetica, tahoma, sans-serif; 
    text-decoration:none; 
} 
</style> 
</html> 
<?php

$gruppe = "FLOT";
echo stgrp_status($gruppe);

function stgrp_status($group = false){
        if(!$group){ return "<div class=\"blockrow\"><b>No group set.</b></div>"; }

		$url = 'http://steamcommunity.com/groups/' . $group . '/memberslistxml/?xml=1';
		$use_errors = libxml_use_internal_errors(true);
		$memberList = simplexml_load_file($url);
		if (!$memberList) { return "<div class=\"blockrow\"><b>Steamcommunity appears to be down.</b></div>"; }
			
		libxml_clear_errors();
		libxml_use_internal_errors($use_errors);
		
		$return = "<div class=\"blockrow\">\n";
		
		$return .= "<a class=\"clanname\" href='http://steamcommunity.com/groups/$group' target='_blank'>" . $memberList->groupDetails->groupName . "</a>\n";
		$return .= "<br>\n";
		$return .= "<span class=\"resultsb\">" . $memberList->memberCount . " Members</span>\n";
		$return .= "<br>\n";
		if (!$memberList->$groupDetails->membersInGame){
			$return .= "<span class=\"membersInGame\"><font color=#8bc53f>" . $memberList->groupDetails->membersInGame . " In-Game</font></span>\n";
			}
			else {
			$return .= "<span class=\"membersInGame\"><font color=#8bc53f>0 In-Game</font></span>\n";
			}
		$return .= "<br>\n";
		if (!$memberList->$groupDetails->membersOnline){
			$return .= "<span class=\"membersOnline\"><font color=#62a7e3>" . $memberList->groupDetails->membersOnline . " Online</font></span>\n";
			}
			else {
			$return .= "<span class=\"membersInGame\"><font color=#62a7e3>0 Online</font></span>\n";
			}
		$return .= "<br>\n";
		$return .= "</div>";
		return $return;
}
?>
